package com.example.test.advice.第六章_枚举和注解.建议90_小心注解继承;

//鸟巢
public enum BirdNest {

    Sparrow;

    //鸟类繁殖
    public Bird reproduce(){
        Desc bd = Sparrow.class.getAnnotation(Desc.class);//本节主要探究的就是bd是否为Null，如果不为Null，则说明注解被继承了
        System.out.println("bd:"+bd);
        return bd == null?new Sparrow():new Sparrow(bd.c());
    }
}
